package services

import (
	"new/dao"
	"new/models"
)

//显示家庭成员表信息
func GetAllfamily_member() (error, []models.Family_member, int64) {
	family_memberdata, total, err := dao.GetAllfamily_member()
	return err, family_memberdata, total
}
func GetAllRelation() (error, []models.Relation, int64) {
	family_relation, total, err := dao.GetAllRelation()
	return err, family_relation, total
}

//删除家庭成员表信息
func Delfamily_member(mno int) error {
	err := dao.Delfamily_member(mno)
	return err
}

//更改家庭成员表信息
func Updatefamily_member(family_member models.Family_member) error {
	err := dao.Updatefamily_member(family_member)
	return err
}

//增加家庭成员表信息
func Addfamily_member(family_member models.Family_member) error {
	err := dao.Addfamily_member(family_member)
	return err
}
